/*
 * CanvasManager.h
 *
 *  Created on: Jul 1, 2009
 *      Author: kurt
 */

#ifndef CANVASMANAGER_H_
#define CANVASMANAGER_H_

#include "Object.h"
#include "DrawableInterface.h"
#include <list>

namespace objdraw 
{

class CanvasManager: public objdraw::Object 
{
	protected:
		std::list<DrawableInterface *> dlist;
	public:
		virtual ~CanvasManager();
		CanvasManager();
		
		virtual std::list<DrawableInterface * >::iterator getDrawableIterator();
		virtual std::list<DrawableInterface * >::iterator begin();
		virtual std::list<DrawableInterface * >::iterator end();
		
		virtual void addDrawable(DrawableInterface * drawable);
		virtual void removeDrawable(DrawableInterface * drawable);
		virtual void sendBackward(DrawableInterface * drawable);
		virtual void sendForward(DrawableInterface * drawable);
		virtual void sendToBack(DrawableInterface * drawable);
		virtual void sendToFront(DrawableInterface * drawable);
		
		virtual void updateDrawable(DrawableInterface * drawable);
		
		virtual void clear();
		
		virtual std::string toString();
};

}

#endif /* CANVASMANAGER_H_ */
